FROM maven:3.8.1-openjdk-17

COPY . /opt/demo

WORKDIR /opt/demo

RUN mvn install

CMD java -Dserver.port=$PORT $JAVA_OPTS -jar target/*.jar